﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GUI.UserControls
{
    public class Bouton : Button
    {
        public Bouton()
        {
            this.Size = new Size(250, 40);
            this.Font = new Font("Trebuchet MS", 12);
            this.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.ForeColor = Color.White;
            if (Tag == "1")
            {
                this.BackColor = Color.FromArgb(40, 82, 145);
                this.Visible = false;
            }
            else
            {
                this.BackColor = Color.FromArgb(34,34,34);
            }
        }

            

        public enum ButtonType
        {
            Inactif,
            Actif
        }
        
		ButtonType _aspect = ButtonType.Inactif;
        [EditorBrowsable(EditorBrowsableState.Always)]
        [Browsable(true)]
        [Bindable(true)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public ButtonType Aspect
        {
            get { return _aspect; }
            set
            {
                _aspect = value;
                if (_aspect == ButtonType.Inactif)
                    this.BackColor = Color.FromArgb(34, 34, 34);
                else
                    this.BackColor = Color.FromArgb(40, 82, 145);
            }
        }
    }
}
